{php include pubTemplate("header_admin")}
<!--main-->
<div class="container mt-3">



<div class="update">
<h1>第二步：升级数据库</h1>

<div class="uplog" id="notice"></div>

<div class="upgo mt-3" style="display:none;">
<a class="btn btn-primary" href="index.php?app=system&ac=update&ts=three">下一步：升级系统文件</a>
</div>

</div>


</div>

<script>
//检测是否有升级
function upsql(version){
	$('#upgrade').html('<img src="public/images/loading.gif" />');
	$.getJSON("https://www.thinksaas.cn/index.php?app=upcenter&ac=find&version="+version+"&callback=?", function(rs){
		if(rs){

			$.post('index.php?app=system&ac=update&ts=twodo',{'upsql':rs.upsql},function(rss){
				if(rss=='1'){
					$("#notice").html("数据库升级完成，点击进入下一步。");
					$(".upgo").show();
				}else if(rss=='0'){
					$("#notice").html("数据库无需升级，点击进入下一步。");
					$(".upgo").show();
				}
			})
		}
	});   
}
upsql('{$TS_CF[info][version]}');
</script>
{php include pubTemplate("footer_admin")}